mv setup.py setup_bak.py
rm -rf build dist
py2applet --make-setup Ounk.py ounk/*
python setup.py py2app
rm -f setup.py
rm -rf build
cp -r files dist/
cp -r settings dist/
cp -r doc dist/
cp scripts/README.txt dist/
mv dist Ounk_OSX
cd Ounk_OSX
find . -name .svn -depth -exec rm -rf {} \;
find . -name *.pyc -depth -exec rm -f {} \;
find . -name .* -depth -exec rm -f {} \;
rm Ounk.app/Contents/Resources/Ounk.ico
mkdir Ounk.app/Contents/Resources/psyco
cp /Library/Frameworks/Python.framework/Versions/2.6/lib/Python2.6/site-packages/psyco/* Ounk.app/Contents/Resources/psyco
cd ..
tar -cjvf Ounk_OSX-0.2.tar.bz2 Ounk_OSX
rm -rf Ounk_OSX
mv setup_bak.py setup.py